<?php
namespace app\model;
class UserResumeExp extends \think\Model{
    public $table="user_resume_exp";


    function add_user_resume_exp($data){

        $data['created_at']=cur_time();
        return $this->insert($data,false,true);
    }

    function edit_user_resume_exp($data,$id){
        $data['updated_at']=cur_time();
        unset($data['id']);
        return $this->where(['id'=>$id])->update($data);
    }

    function del_user_resume_exp($id){
        return $this->where(['id'=>$id])->delete();
    }

    function get_arrs_by_user_id($user_id){
        $o=$this->where(['user_id'=>$user_id])->select();
        return object2array($o);
    }

    /**
     * 根据工作经历ID，返回对应的工作经历详情
     * @param $id
     * @return mixed
     */
    function get_resume_exp_by_id($id){
        $o=$this->where(['id'=>$id])->find();
        return object2array($o);
    }
}